﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Vista.Admin
{
    public partial class Alta : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

            if (!IsPostBack)
            {
                string accio = Request.QueryString["a"];

                if (!String.IsNullOrEmpty(accio))
                {
                    // Alta Client
                    if (accio.Equals("c"))
                    {
                        pnlAltaClient.Visible = true;
                        pnlAltaMaquina.Visible = pnlAltaArticle.Visible = pnlRelacio.Visible = false;
                    }

                    // Alta Màquina
                    if (accio.Equals("m"))
                    {
                        pnlAltaMaquina.Visible = true;
                        pnlAltaClient.Visible = pnlAltaArticle.Visible = pnlRelacio.Visible = false;
                    }

                    // Alta Article
                    if (accio.Equals("a"))
                    {
                        pnlAltaArticle.Visible = true;
                        pnlAltaClient.Visible = pnlAltaMaquina.Visible = pnlRelacio.Visible = false;
                    }

                    // Alta relacio Preu dels articles per a cada client
                    if (accio.Equals("pca"))
                    {
                        pnlRelacio.Visible = true;
                        pnlAltaArticle.Visible = pnlAltaClient.Visible = pnlAltaMaquina.Visible = false;
                    }
                }
            }
        }
    }
}